home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / include / devices / narrator.h < prev    next >
C/C++ Source or Header  |  1996-09-10  |  6KB  |  152 lines

  1. #ifndef DEVICES_NARRATOR_H
  2. #define DEVICES_NARRATOR_H 1
  3. /*
  4. ** narrator.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/03/95
  11. **
  12. **
  13. */
  14.  
  15.  
  16. /*
  17. ** This are the StructPointer defines for narrator.h
  18. */
  19. #ifndef mouth_rbPtr
  20. #define mouth_rbPtr ADDRESS
  21. #endif
  22. #ifndef narrator_rbPtr
  23. #define narrator_rbPtr ADDRESS
  24. #endif
  25. /*
  26. ** End of StructPointer defines for narrator.h
  27. */
  28.       
  29. #ifndef EXEC_IO_H
  30. #include <exec/io.h>
  31. #endif
  32.  
  33.  
  34.  
  35.         /*      Device Options  */
  36.  
  37. #define NDB_NEWIORB 0   /* Use new extended IORB        */
  38. #define NDB_WORDSYNC    1   /* Generate SHORTINT sync messages      */
  39. #define NDB_SYLSYNC 2   /* Generate syllable sync messages  */
  40.  
  41.  
  42. #define NDF_NEWIORB (1)
  43. #define NDF_WORDSYNC    (2)
  44. #define NDF_SYLSYNC (4)
  45.  
  46.  
  47.  
  48.         /*      Error Codes     */
  49.  
  50. #define ND_NoMem    -2  /* Can't allocate memory        */
  51. #define ND_NoAudLib -3  /* Can't open audio device      */
  52. #define ND_MakeBad  -4  /* Error in MakeLibrary call        */
  53. #define ND_UnitErr  -5  /* Unit other than 0            */
  54. #define ND_CantAlloc    -6  /* Can't allocate audio channel(s)  */
  55. #define ND_Unimpl   -7  /* Unimplemented command        */
  56. #define ND_NoWrite  -8  /* Read for mouth without write first   */
  57. #define ND_Expunged -9  /* Can't open,  deferred expunge bit set */
  58. #define ND_PhonErr     -20  /* Phoneme code spelling error          */
  59. #define ND_RateErr     -21  /* Rate out of bounds           */
  60. #define ND_PitchErr    -22  /* Pitch out of bounds              */
  61. #define ND_SexErr      -23  /* Sex not valid            */
  62. #define ND_ModeErr     -24  /* Mode not valid           */
  63. #define ND_FreqErr     -25  /* Sampling frequency out of bounds */
  64. #define ND_VolErr      -26  /* Volume out of bounds     */
  65. #define ND_DCentErr    -27  /* Degree of centralization out of bounds */
  66. #define ND_CentPhonErr -28  /* Invalid central phon         */
  67.  
  68.  
  69.  
  70.         /* Input parameters and defaults */
  71.  
  72. #define DEFPITCH    110     /* Default pitch            */
  73. #define DEFRATE     150     /* Default speaking rate (wpm)          */
  74. #define DEFVOL      64      /* Default volume (full)        */
  75. #define DEFFREQ     22200   /* Default sampling frequency (Hz)  */
  76. #define MALE        0       /* Male vocal tract         */
  77. #define FEMALE      1       /* Female vocal tract           */
  78. #define NATURALF0   0       /* Natural pitch contours       */
  79. #define ROBOTICF0   1       /* Monotone pitch           */
  80. #define MANUALF0    2       /* Manual setting of pitch contours */
  81. #define DEFSEX      MALE    /* Default sex                  */
  82. #define DEFMODE     NATURALF0   /* Default mode         */
  83. #define DEFARTIC    100     /* 100% articulation (normal)       */
  84. #define DEFCENTRAL  0       /* No centralization            */
  85. #define DEFF0PERT   0       /* No F0 Perturbation           */
  86. #define DEFF0ENTHUS 32      /* Default F0 enthusiasm (in 32nds) */
  87. #define DEFPRIORITY 100     /* Default speaking priority        */
  88.  
  89.  
  90.             /*  Parameter bounds    */
  91.  
  92. #define MINRATE     40      /* Minimum speaking rate        */
  93. #define MAXRATE     400     /* Maximum speaking rate        */
  94. #define MINPITCH    65      /* Minimum pitch            */
  95. #define MAXPITCH    320     /* Maximum pitch            */
  96. #define MINFREQ     5000    /* Minimum sampling frequency       */
  97. #define MAXFREQ     28000   /* Maximum sampling frequency       */
  98. #define MINVOL      0       /* Minimum volume           */
  99. #define MAXVOL      64      /* Maximum volume           */
  100. #define MINCENT      0      /* Minimum degree of centralization */
  101. #define MAXCENT    100      /* Maximum degree of centralization */
  102.  
  103.  
  104.         /*    Standard Write request    */
  105.  
  106. STRUCT narrator_rb  
  107.     IOStdReq _message    /* Standard IORB        */
  108.     SHORTINT   rate            /* Speaking rate (words/minute) */
  109.     SHORTINT   pitch           /* Baseline pitch in Hertz      */
  110.     SHORTINT   mode            /* Pitch mode           */
  111.     SHORTINT   sex             /* Sex of voice         */
  112.     ADDRESS   ch_masks       /* Pointer to audio alloc maps  */
  113.     SHORTINT   nm_masks        /* Number of audio alloc maps   */
  114.     SHORTINT   volume          /* Volume. 0 (off) thru 64  */
  115.     SHORTINT   sampfreq        /* Audio sampling freq          */
  116.     BYTE    mouths          /* If non-zero,  generate mouths */
  117.     BYTE    chanmask        /* Which ch mask used (internal)*/
  118.     BYTE    numchan         /* Num ch masks used (internal) */
  119.     BYTE    flags           /* New feature flags        */
  120.     BYTE    F0enthusiasm        /* F0 excursion factor      */
  121.     BYTE    F0perturb       /* Amount of F0 perturbation    */
  122.     BYTE    F1adj           /* F1 adjustment in ±5% steps   */
  123.     BYTE    F2adj               /* F2 adjustment in ±5% steps   */
  124.     BYTE    F3adj           /* F3 adjustment in ±5% steps   */
  125.     BYTE    A1adj           /* A1 adjustment in decibels    */
  126.     BYTE    A2adj           /* A2 adjustment in decibels    */
  127.     BYTE    A3adj           /* A3 adjustment in decibels    */
  128.     BYTE    articulate      /* Transition time multiplier   */
  129.     BYTE    centralize      /* Degree of vowel centralization */
  130.     ADDRESS   centphon       /* Pointer to central ASCII phon  */
  131.     BYTE    AVbias          /* AV bias          */
  132.     BYTE    AFbias          /* AF bias          */
  133.     BYTE    priority        /* Priority while speaking  */
  134.     BYTE    pad1            /* For alignment        */
  135. END STRUCT 
  136.  
  137.  
  138.  
  139.         /*    Standard Read request */
  140.  
  141. STRUCT mouth_rb  
  142.     narrator_rb voice   /* Speech IORB          */
  143.     BYTE    _width           /* Width (returned value)   */
  144.     BYTE    height          /* Height (returned value)  */
  145.     BYTE    shape           /* Internal use,  do not modify  */
  146.     BYTE    sync            /* Returned sync events     */
  147. END STRUCT 
  148.  
  149.  
  150.  
  151. #endif  /* DEVICES_NARRATOR_H */
  152.